package com.apex.oauth.security.hystrix;

import com.apex.oauth.security.domian.UserLoginDomain;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 用户登录信息
 * Create by IntelliJ IDEA
 * 用户：王建
 * 日期：2018-4-3
 */
@Component
public class UserInformationHystrixService  implements FallbackFactory<UserLoginDomain> {

    @Override
    public UserLoginDomain create(Throwable throwable) {
        return new UserLoginDomain() {
            @Override
            public String findByUserId(String userId) {
                return "error";
            }
        };
    }
}
